CD2Alloy: A Translation of Class Diagrams to Alloy
نویسندگان
چکیده
This report presents a translation from UML class diagrams [OMG15, Rum16] to Alloy modules [Jac06] and a translation from Alloy instances back to UML object diagrams. An overview of the translation was first presented in [MRR11a] and applied in [MRR11b] to semantic differencing of class diagrams. It supports an extended list of CD language features, including, e.g., directed associations, composite aggregations, interfaces, multiple inheritance, and enumerations. The translation thus supports essential features of many real-world CDs, UML and EMF metamodels, practically not analyzable before. An important feature of the translation is the ability to analyze multiple class diagrams within one Alloy module, which is not possible with previous translations. This document defines the translations by translation rules that operate on the abstract syntax of a class diagram language and produce concrete syntax of the Alloy language. We give examples showing class diagrams and complete representations in Alloy as well as an Alloy instance and its object diagram representation.
منابع مشابه
A Model Driven Approach for the Atomated Analysis of UML Class Diagrams
The Unified Modeling Language (UML) is widely considered as the defacto standard for the design of Object Oriented systems. UML class diagrams are used to depict the static structure of a system with its entities and the relationships between them. The Object Constraint Language (OCL) is a textual language based on first-order logic and can be used to define constraints on the elements of class...
متن کاملInvestigation of the magnetic interactions in Co2FeAl alloy nanoparticles using FORC analysis
This paper demonstrates the results of the detailed studying of the magnetic behavior of Co2FeAl alloy nanoparticles synthesized through a co-precipitation method. First order reversal curves (FORCs) diagrams were used consequently. The obtained results showed that the prepared alloys consist of a mixture of the low-coercivity grains (Hc ~ 0), and interacting single-domain high-coercivity grain...
متن کاملFrom Activity Diagrams to Class Diagrams
A translation from activity diagrams to class diagrams, with executable code, is presented. The translation is amenable to be made with or without automating tools. An illustrative application example is also briefly presented: Activity diagrams are used in the modelling and implementation of graphical user interfaces, more precisely in the controller part of the Model-View-Controller pattern.
متن کاملFormal Refactoring for UML Class Diagrams
Refactoring UML models for evolution is usually carried out in an ad hoc way. These transformations can become an issue, since it is hard to ensure that the semantics of models is preserved. We provide a set of semantics-preserving transformations for UML class diagrams annotaded with OCL. Using the proposed transformations, software designers can safely define larger transformations and detect...
متن کاملUsing lightweight formal methods to model class and object diagrams
In this paper a formal model for class and object diagrams is presented. To make the model the author used Alloy, which is a threein-one package: a modeling language that constructs software models, a formal method that guides the construction of software models and an analyzer that helps find inconsistencies in software models. In the proposed model the entities that form class and object diag...
متن کامل